<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num = prompt('请输入你兜里的钱数');
        if (num >= 2000) {
            alert('可以吃西餐');
        } else if (num >= 1500) {
            alert('吃快餐吧');
        } else if (num >= 1000) {
            alert('喝饮料吧');
        } else if (num >= 500) {
            alert('吃个棒棒糖吧');
        } else {
            alert('喝西北风吧');
        }
    </script>
</head>

<body>

</body>

</html>